﻿using Sgr.Domain.Managers;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Sgr.UPMS.Domain.Roles
{
    public interface IRoleManage : IDomainManager
    {
        /// <summary>
        /// 创建一个新的角色 [确保名称唯一]
        /// </summary>
        /// <param name="roleName"></param>
        /// <param name="orgId"></param>
        /// <param name="orderNumber"></param>
        /// <param name="remarks"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<Role> CreateNewAsync(string roleName, long orgId, int orderNumber, string? remarks, CancellationToken cancellationToken = default);

        /// <summary>
        /// 修改角色名称 [确保名称唯一]
        /// </summary>
        /// <param name="role"></param>
        /// <param name="roleName"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task ChangeNameAsync(Role role, string roleName, CancellationToken cancellationToken = default);
    }
}